package solver.moves;

public class MoveStatistics {
	int calls = 0;
	int failed=0;
	int successes=0;
	int improving=0;
	int samecost=0;
	int worsening=0;
	int accepted=0;
	int undone=0;
	public int getCalls() {
		return calls;
	}
	public void incrCalls() {
		calls++;
	}
	public void setCalls(int calls) {
		this.calls = calls;
	}
	public int getFailed() {
		return failed;
	}
	public void incrFailed() {
		failed++;
	}
	public void setFailed(int failed) {
		this.failed = failed;
	}
	public int getSuccesses() {
		return successes;
	}
	public void incrSuccesses() {
		successes++;
	}
	public void setSuccesses(int successes) {
		this.successes = successes;
	}
	
	public int getImproving() {
		return improving;
	}
	public void incrImproving() {
		improving++;
	}
	public void setImproving(int improving) {
		this.improving = improving;
	}	
	public int getSamecost() {
		return samecost;
	}
	public void incrSamecost() {
		samecost++;
	}
	public void setSamecost(int samecost) {
		this.samecost = samecost;
	}
	public int getWorsening() {
		return worsening;
	}
	public void incrWorsening() {
		worsening++;
	}
	public void setWorsening(int worsening) {
		this.worsening = worsening;
	}
	
	public String toString(){
		return " "+String.format("%.5f", (successes/(double)calls))+"(s:"+successes+"/f:"+failed+")"
				+"[<:"+improving+"|=:"+samecost+"|>:"+worsening+"]";
	}
}
